﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace CPN.PJN.Service.Logging.UnitTests
{
    /// <summary>
    /// Summary description for Service Logger
    /// </summary>
    [TestClass]
    public class LoggerUnitTest
    {       
        /// <summary>
        /// Vérification du Bon Fonctionnement du Logger
        /// </summary>
        [TestMethod]
        public void TestMethodWrite()
        {
            ILoggerService service = new LoggerService();
            service.Write("Test");
        }

        /// <summary>
        /// Vérification du Bon Fonctionnement du Logger
        /// </summary>
        [TestMethod]
        public void TestMethodWritewithCategory()
        {
            ILoggerService service = new LoggerService();
            service.WriteWithCategory("Test", "General");
        }

        /// <summary>
        /// Vérification du Bon Fonctionnement du Logger
        /// </summary>
        [TestMethod]
        public void TestMethodWritewithCategoryAndSeverity()
        {
            ILoggerService service = new LoggerService();
            service.WriteWithSeverity("Test", "General", 0);
            service.WriteWithSeverity("Test information", "General", 16);
            service.WriteWithSeverity("Test Log Debug", "General", 8);
            service.WriteWithSeverity("Test Log Erreur", "General", 2);
            service.WriteWithSeverity("Test Log Fatal", "General", 1);
        }
    }
}
